<template>
  <div>
    <button @click="emit('changeCount',9)">点击获取子传父</button>
  </div>
</template>

<script lang="ts">
import {defineComponent} from "vue";
export default defineComponent({
    name:"Count",
})
</script>

<script lang="ts" setup>
const emit =  defineEmits<{
    (event:"changeCount",n:number):void
}>()
</script>

<style scoped>

</style>